package com.fjwt.gz.service.mapper;

import com.fjwt.gz.db.entity.FansSourceEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fjwt.gz.db.entity.OldFansInfoEntity;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 用户来源表 Mapper 接口
 * </p>
 *
 * @author shiyonghao
 * @since 2025-04-09
 */
public interface FansSourceMapper extends BaseMapper<FansSourceEntity> {

    /**
     * 查询用户来源是否存在
     * @param appId
     * @return
     */
    FansSourceEntity findFansSourceByFansId(Long fansId, String appId);

    /**
     * 变更归属关系
     * @param fansSourceId
     * @param oldFansInfo
     * @return
     */
    int updateFansAgentNo(@Param("fansSourceId") Long fansSourceId,@Param("info") OldFansInfoEntity oldFansInfo);
}
